﻿using System;
using System.Collections;

namespace Tstring.Comm {
    [Serializable]
    public class DictInfo {
        public static readonly DictInfo Empty = new DictInfo();
        public DictInfo() {
            _audio = _def = _En = _id = _pron = string.Empty;
        }
        public DictInfo( string en )
            : this() {
            this._En = en;
        }

        #region Field
        private string _id, _En, _audio, _pron, _def;
        #endregion

        #region Property
        /// <summary>
        /// 单词
        /// </summary>
        public string En {
            get {
                if( string.IsNullOrEmpty( _En ) ) {
                    return string.Empty;
                }
                return _En.ToLower();
            }
            set { _En = value; }
        }

        /// <summary>
        /// 中文解释
        /// </summary>
        public string Def {
            get { return _def; }
            set { _def = value; }
        }

        /// <summary>
        /// 单标
        /// </summary>
        public string Pron {
            get { return _pron; }
            set { _pron = value; }
        }

        /// <summary>
        /// 发音
        /// </summary>
        public string Audio {
            get { return _audio; }
            set { _audio = value; }
        }
        /// <summary>
        /// 编号
        /// </summary>
        public string Id {
            get { return _id; }
            set { _id = value; }
        }
        #endregion

        #region isnullorempty
        public static bool IsNullOrEmpty( DictInfo e ) {
            return e == null || e == Empty;
        }
        #endregion
    }

    /*
     * ilmerge /t:dll /log Tstring.Core.dll DevExpress.Data.v7.3.dll DevExpress.OfficeSkins.v7.3.dll DevExpress.Utils.v7.3.dll log4net.dll  /out:kkun/Tstring.Core.dll
     */
}
